/**
 * Generate time : 2011-07-18 1:36:45
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.cs.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCSSystemSettingCL table comment : 现场安全设置
 */
public class ZMCSSystemSettingCL extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdManageDepartId = " "; /* 安全主管部门 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdManageDepartId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("安全主管部门");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCSSystemSettingCL() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdManageDepartId - 安全主管部门
	 * 
	 * @return the fdManageDepartId
	 */
	public String getFdManageDepartId() {
		return this.fdManageDepartId;
	}

	/**
	 * set the fdManageDepartId - 安全主管部门
	 */
	public void setFdManageDepartId(String fdManageDepartId) {
		this.fdManageDepartId = fdManageDepartId;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdManageDepartId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdManageDepartId")), fdManageDepartId));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdManageDepartId", StringUtils.toString(fdManageDepartId, eiMetadata.getMeta("fdManageDepartId")));

		return map;

	}
}